The present invention relates to an infrared detection algorithm, in particular to a detection algorithm for an infrared proximity sensor of a touch screen mobile phone.
Primarily based on the emitting and receiving principle of the infrared light pulse, the infrared proximity sensor judges the proximity of an object by the energy magnitude of the reflected infrared light which is received by the infrared photosensitive diode. The majority of the touch screen mobile phones available on the market are equipped with the infrared proximity sensor to control the turning on and off of the touch screen during the call, thus avoiding misoperation caused by facial interference with the touch screen in this time. The currently used proximity detection method is as follows: set proximity and departure threshold values; when the value received by the photoelectric diode is greater than this proximity threshold value, make the judgment of proximity, turn off the touch screen; when the value received by the photoelectric diode is smaller than the departure threshold value, make the judgment of departure, and turn on the touch screen.
The majority of the machines available on the market that adopt the above proximity detection method cannot solve the following problems: 1, due to low reflectivity of a black object, when black hairs are close to or adhered to the touch screen, the infrared proximity sensor cannot reliably identify if there is proximity action and therefore cannot reliably turn off the screen; 2, if the screen corresponding to the proximity sensor is adhered with a protective film or has smudges (such as greasy dirty, sweat, cosmetic, etc), it fails to function as usual or judge the proximity and departure actions because the distance threshold values are different from those in case of no protective film and smudges, and the sensitivity of the infrared proximity sensor will be reduced.